#ifndef __TIME_UTILS_H__
#define __TIME_UTILS_H__

#include <string>
#include <ctime>
#include <chrono>

#include "rkmedia_buffer.h"

#define xfree(x) free(x); x = NULL;
#define rkfree(x) RK_MPI_MB_ReleaseBuffer(x); x = NULL;

#define DEBUG_CALIBRATION 0
#define DEBUG_GOTO 0
#define DEBUG_STACKING 0

int print_time();
std::string steadyTimeToSystemTime(const struct timeval& steady_time);
std::string getTimeStamp();
std::string getTimeStamp(std::chrono::system_clock::time_point time_point, const char* timestamp_format);
int checkSdExist();
long getTimestampInSeconds();
std::time_t getSecondsTimestamp();

#endif